﻿namespace LayoutGridview.Models
{
    using LayoutGridview.Helpers;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using Windows.UI.Xaml.Media;

    public class GroupData : BindableBase
    {
        public GroupData(string title, IEnumerable<SimpleData> children)
        {
            this.Title = title;
            if (children != null)
            {
                this.Children.Clear();
                foreach (var item in children)
                    this.Children.Add(item);
            }
        }

        string m_Title = default(string);
        public string Title { get { return this.m_Title; } set { this.SetProperty(ref this.m_Title, value); } }

        ObservableCollection<SimpleData> m_Children = new ObservableCollection<SimpleData>();
        public ObservableCollection<SimpleData> Children { get { return this.m_Children; } }

        SolidColorBrush m_Brush = default(SolidColorBrush);
        public SolidColorBrush Brush { get { return m_Brush; } set { SetProperty(ref m_Brush, value); } }
    }
}
